<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <script>
  //1.对象的字面量
  var ob1 = {
    name:"why"
  }
  
  //2.new Object
  //Object 构造函数
  var obj2=new Object()
  //添加属性
  obj2.name="kobe"
  
  //3.new 其他类()
  function Person(){}//自定义构造函数
  var obj3=new Person()
  </script>
</body>
</html>